//
//  WetViewController.m
//  mhome
//
//  Created by 刘春雷 on 2018/11/29.
//  Copyright © 2018年 刘春雷. All rights reserved.
//

#import "WetViewController.h"

@interface WetViewController ()
@property(nonatomic,strong)UIScrollView *scroll;
@end

@implementation WetViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"泥工工程";
    self.scroll = [[UIScrollView alloc]initWithFrame:CGRects(0, 0, 375, 667)];
    self.scroll.contentSize = CGSizeMake(0 , 1780*kHeightScale);
    self.scroll.backgroundColor = [UIColor whiteColor];
    self.scroll.pagingEnabled = NO;//是否允许整也翻
    self.scroll.bounces = NO;//关闭弹簧效果
    self.scroll.showsVerticalScrollIndicator = NO;//是否显示垂直滚动条
    [self.view addSubview:self.scroll];
    [self setUI];
}
- (void)setUI {
    UIImageView*headImage=[[UIImageView alloc] initWithFrame:CGRects(0, 0, 375, 135)];
    headImage.backgroundColor = [UIColor grayColor];
    headImage.image=[UIImage imageNamed:@"construct-ban"];
    [self.scroll addSubview:headImage];

    for(int i = 0; i< 5;i++){
        UILabel*title=[[UILabel alloc ] init];
        title.font=[UIFont systemFontOfSize:20.0*BIZ];//字体大小
        [self.scroll addSubview:title];
        UILabel*content=[[UILabel alloc] init];
        content.numberOfLines = 0;
        content.font=[UIFont systemFontOfSize:13.0*BIZ];//字体大小
        content.textColor=[UIColor grayColor];
        [self.scroll addSubview:content];
        UIImageView*imgOne=[[UIImageView alloc] init];
        [self.scroll addSubview:imgOne];
        if(i == 0){
            title.frame = CGRects(15, 170, 300, 30);
            title.text=@"砌筑工艺";
            content.frame = CGRects(15, 200, 345, 160);
            content.text= @" ● 砌筑方法:上下错缝,内外搭接。\n ● 砖面应横平竖直,垂直度、表面平整度偏差≤4mm。\n ● 灰缝厚薄均匀,厚度宜为8-12mm,灰缝砂浆饱满度≥80%。\n ● 新砌墙最上端应使用斜砌工艺,利于与原顶面（梁底面）紧密结合。\n ● 砌墙时必须植拉结筋,宜每间隔500mm设2根Φ6水平拉结筋。";
            imgOne.frame = CGRects(20, 360, 335, 140);
            imgOne.image=[UIImage imageNamed:@"wet1"];
        }else if(i == 1){
            title.frame = CGRects(15, 520, 300, 30);
            title.text=@"抹灰基层要求";
            content.frame = CGRects(15, 550, 345, 140);
            content.text= @" ● 抹灰前基层表面的尘土、污垢、油渍等应清除干净,并洒水 润湿。\n ● 抹灰层与基层之间及各抹灰层之间必须粘结牢固,抹灰层应无脱层、空鼓，面层应无爆灰、裂缝。\n ● 新老墙面连接处表面的抹灰应采取防止开裂的加强措施;采用铁丝网时,铁丝网与各基体的搭接宽度应≥100mm。";
            imgOne.frame = CGRects(20, 690, 335, 140);
            imgOne.image=[UIImage imageNamed:@"wet2"];
        }else if(i == 2){
            title.frame = CGRects(15, 830, 300, 30);
            title.text=@"基层处理要求";
            content.frame = CGRects(15, 860, 345, 60);
            content.text= @" ● 基层表面如有蜂窝及松散的混凝土,要剔除,并用水冲刷干净,然后用1∶3水泥砂浆抹平或用1∶2干硬性水泥砂浆捻实。";
            imgOne.frame = CGRects(20, 920, 335, 140);
            imgOne.image=[UIImage imageNamed:@"wet3"];
        }
        else if(i == 3){
            title.frame = CGRects(15, 1080, 300, 30);
            title.text=@"卫生间地面防水";
            content.frame = CGRects(15, 1110, 345, 180);
            content.text=@" ● 卫生间地面防水施工工艺（如图所示）。\n ● 防水砂浆配比应符合设计或产品要求。\n ● 卫生间墙面的防水层涂刷高度≥1800mm。\n ● 卫生间地面防水层应从地面上翻至墙面,上翻高度不得低于300mm。\n ● 涂抹涂刷应均匀一致,不得漏刷;防水层应与基层结合牢固,表面平整,无空鼓、裂缝、麻面、起砂等现象,阴阳角做成圆弧形。";
            imgOne.frame = CGRects(20, 1290, 335, 140);
            imgOne.image=[UIImage imageNamed:@"wet4"];
        }else{
            title.frame = CGRects(15, 1430, 300, 30);
            title.text=@"地砖湿铺工艺";
            content.frame = CGRects(15, 1460, 345, 80);
            content.text=@" ● 检查地面找平,表面应平整,无杂物、空鼓、起砂。\n ● 铺贴使用的砂浆比例宜为1:3。\n ● 铺贴前,地面应刷水泥素浆。";
            imgOne.frame = CGRects(20, 1540, 335, 140);
            imgOne.image=[UIImage imageNamed:@"wet5"];
        }
        //改变label的间边距
        NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:content.text];
        NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
        [paragraphStyle setLineSpacing:6];
        [attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [content.text length])];
        content.attributedText = attributedString;
    }
}
- (void)btns {
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
